(function () {
    console.log('Injecting script into the page...');
    const enterTimer = setInterval(() => {
        const btn = Array.from(document.querySelectorAll('button'))
            .find(el => el.textContent.includes('Start using Photopea'));
        if (btn) {
            btn.click();
            clearInterval(enterTimer);
        }
    }, 1000);
    const adTimer = setInterval(() => {
        const adWin = Array.from(document.querySelectorAll('.window.bnotify'))
            .find(el => el.textContent.includes('Are you blocking ads?'))
        if (adWin) {
            adWin.remove();
        }
    }, 1000)
})()
